package com.example.shushiyunsst.fragment.main.home.child.bean;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.shushiyunsst.R;
import com.example.wallet.global.AppGlobals;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class MotherIconBean implements Serializable {


    /**
     * nodeLock : 30000
     * scmlAccTotalIncome : 3294.735
     * isActiveScml : 1
     * scmlBalanceMixAvailable : 99497
     * hechengScmlBalance : 0
     * ziyouScmlBalance : 69497
     * scmlBalance : 103449
     * cmlBalanceMixAvailable : 8588.8255
     * walletAddress : 0xc3218c111132e70b05171e9c33af42d6ca2c14bf
     * scmlBalanceLog : [{"logType":1,"logTypeDesc":"母币合成","txNums":50,"scmlZyNums":25,"cmlZyNums":25,"createTime":"2020-12-21 17:39:21","walletAddress":"0xc3218c111132e70b05171e9c33af42d6ca2c14bf"},{"logType":1,"logTypeDesc":"母币合成","txNums":2800,"scmlZyNums":1400,"cmlZyNums":1400,"createTime":"2020-12-21 17:47:29","walletAddress":"0xc3218c111132e70b05171e9c33af42d6ca2c14bf"},{"logType":1,"logTypeDesc":"母币合成","txNums":926,"scmlZyNums":463,"cmlZyNums":463,"createTime":"2020-12-21 17:47:53","walletAddress":"0xc3218c111132e70b05171e9c33af42d6ca2c14bf"},{"logType":1,"logTypeDesc":"母币合成","txNums":76,"scmlZyNums":38,"cmlZyNums":38,"createTime":"2020-12-21 18:10:05","walletAddress":"0xc3218c111132e70b05171e9c33af42d6ca2c14bf"},{"logType":1,"logTypeDesc":"母币合成","txNums":100,"scmlZyNums":50,"cmlZyNums":50,"createTime":"2020-12-29 11:46:32","walletAddress":"0xc3218c111132e70b05171e9c33af42d6ca2c14bf"}]
     */

    private String tokenType= AppGlobals.getApplication().getString(R.string.wallet_cml);

    private String accountType= AppGlobals.getApplication().getString(R.string.wallet_s_cml);

    //节点质押
    @JSONField(name = "nodeLock")
    private int nodeLock;

    @JSONField(name = "activeScmlLockNeedCmlNums")
    private String activeScmlLockNeedCmlNums;


    //母币累计生息
    @JSONField(name = "scmlAccTotalIncome")
    private double scmlAccTotalIncome;

    //否激活母币账户  1是 0否
    @JSONField(name = "isActiveScml")
    private int isActiveScml;

    //母币可用合成数量
    @JSONField(name = "scmlBalanceMixAvailable")
    private double scmlBalanceMixAvailable;

    //合成母币
    @JSONField(name = "hechengScmlBalance")
    private double hechengScmlBalance;

    //自由母币
    @JSONField(name = "ziyouScmlBalance")
    private double ziyouScmlBalance;

    //母币余额
    @JSONField(name = "scmlBalance")
    private double scmlBalance;

    //子币可用合成数量
    @JSONField(name = "cmlBalanceMixAvailable")
    private double cmlBalanceMixAvailable;

    //母币地址
    @JSONField(name = "walletAddress")
    private String walletAddress;


    @JSONField(name = "scmlBalanceLog")
    private List<MotherIconSubListBean> scmlBalanceLog;

    @JSONField(name = "imageList")
    private List<MotherIconBannerListBean>imageList;

    public List<MotherIconBannerListBean> getImageList() {
        if (imageList == null) imageList=new ArrayList<>();
        return imageList;
    }

    public void setImageList(List<MotherIconBannerListBean> imageList) {
        this.imageList = imageList;
    }

    public String isActiveScmlStr(){
        return isActiveScml()?"已激活":"激活母币生息";
    }

    public String getActiveScmlLockNeedCmlNums() {
        return activeScmlLockNeedCmlNums;
    }

    public void setActiveScmlLockNeedCmlNums(String activeScmlLockNeedCmlNums) {
        this.activeScmlLockNeedCmlNums = activeScmlLockNeedCmlNums;
    }

    public Integer getNodeLock() {
        return nodeLock;
    }

    public String getTokenType() {
        return tokenType;
    }

    public String getAccountType() {
        return accountType;
    }

    public void setAccountType(String accountType) {
        this.accountType = accountType;
    }

    public void setTokenType(String tokenType) {
        this.tokenType = tokenType;
    }

    public String getNodeLockStr(){
        return nodeLock+"";
    }

    public void setNodeLock(Integer nodeLock) {
        this.nodeLock = nodeLock;
    }

    public double getScmlAccTotalIncome() {
        return scmlAccTotalIncome;
    }

    public String getScmlAccTotalIncomeStr() {
        return scmlAccTotalIncome+"";
    }

    public void setScmlAccTotalIncome(Double scmlAccTotalIncome) {
        this.scmlAccTotalIncome = scmlAccTotalIncome;
    }

    public int getIsActiveScml() {
        return isActiveScml;
    }

    public boolean isActiveScml() {
        return isActiveScml==1;
    }

    public void setIsActiveScml(int isActiveScml) {
        this.isActiveScml = isActiveScml;
    }

    public double getScmlBalanceMixAvailable() {
        return scmlBalanceMixAvailable;
    }

    public String getScmlBalanceMixAvailableStr() {
        return scmlBalanceMixAvailable+"";
    }

    public String getCmlBalanceMixAvailableStr() {
        return cmlBalanceMixAvailable+"";
    }

    public void setScmlBalanceMixAvailable(Integer scmlBalanceMixAvailable) {
        this.scmlBalanceMixAvailable = scmlBalanceMixAvailable;
    }

    public double getHechengScmlBalance() {
        return hechengScmlBalance;
    }

    public String getHechengScmlBalanceStr() {
        return hechengScmlBalance+"";
    }

    public void setHechengScmlBalance(Integer hechengScmlBalance) {
        this.hechengScmlBalance = hechengScmlBalance;
    }

    public double getZiyouScmlBalance() {
        return ziyouScmlBalance;
    }

    public String getZiyouScmlBalanceStr() {
        return ziyouScmlBalance+"";
    }

    public void setZiyouScmlBalance(Integer ziyouScmlBalance) {
        this.ziyouScmlBalance = ziyouScmlBalance;
    }

    public double getScmlBalance() {
        return scmlBalance;
    }

    public String getScmlBalanceStr() {
        return scmlBalance+"";
    }

    public void setScmlBalance(Integer scmlBalance) {
        this.scmlBalance = scmlBalance;
    }

    public double getCmlBalanceMixAvailable() {
        return cmlBalanceMixAvailable;
    }

    public void setCmlBalanceMixAvailable(Double cmlBalanceMixAvailable) {
        this.cmlBalanceMixAvailable = cmlBalanceMixAvailable;
    }

    public String getWalletAddress() {
        return walletAddress;
    }

    public void setWalletAddress(String walletAddress) {
        this.walletAddress = walletAddress;
    }

    public List<MotherIconSubListBean> getScmlBalanceLog() {
        if (scmlBalanceLog == null) scmlBalanceLog = new ArrayList<>();
        return scmlBalanceLog;
    }

    public void setScmlBalanceLog(List<MotherIconSubListBean> scmlBalanceLog) {
        this.scmlBalanceLog = scmlBalanceLog;
    }


}
